<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>交互式图片画廊</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#3B82F6',
                        secondary: '#10B981',
                        dark: '#1E293B',
                        light: '#F8FAFC'
                    },
                    fontFamily: {
                        inter: ['Inter', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .perspective-1000 {
                perspective: 1000px;
            }
            .preserve-3d {
                transform-style: preserve-3d;
            }
            .backface-hidden {
                backface-visibility: hidden;
            }
        }
    </style>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
        
        body {
            font-family: 'Inter', sans-serif;
            scroll-behavior: smooth;
            background-color: rgb(233, 199, 156);
        }
        
        .image-card {
            transition: all 0.2s ease-out;
        }
        
        .image-card:hover {
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        
        .image-container {
            will-change: transform;
            transition: transform 0.05s ease-out;
        }
    </style>
</head>
<body class="bg-gradient-to-br from-gray-50 to-gray-100 min-h-screen text-dark">
    <!-- 导航栏 -->
    <header class="sticky top-0 z-50 bg-white/80 backdrop-blur-md border-b border-gray-200 transition-all duration-300">
        <div class="container mx-auto px-4 py-4 flex justify-between items-center">
            <div class="flex items-center space-x-2">
                <i class="fa-solid fa-cubes text-primary text-2xl"></i>
                <h1 class="text-xl md:text-2xl font-bold text-dark">3D<span class="text-primary">画廊</span></h1>
            </div>
            <nav class="hidden md:flex space-x-8">
                <a href="#gallery" class="font-medium text-gray-700 hover:text-primary transition-colors">画廊</a>
                <a href="#about" class="font-medium text-gray-700 hover:text-primary transition-colors">关于</a>
                <a href="#contact" class="font-medium text-gray-700 hover:text-primary transition-colors">联系</a>
            </nav>
            <button class="md:hidden text-gray-700 focus:outline-none">
                <i class="fa-solid fa-bars text-xl"></i>
            </button>
        </div>
    </header>

    <!-- 英雄区域 -->
    <section class="relative h-[80vh] flex items-center justify-center overflow-hidden">
        <div class="absolute inset-0 bg-gradient-to-r from-dark/80 to-dark/60 z-10"></div>
        <div class="absolute inset-0">
            <img src="https://picsum.photos/id/1039/1920/1080" alt="背景" class="w-full h-full object-cover">
        </div>
        <div class="container mx-auto px-4 relative z-20 text-center">
            <h2 class="text-[clamp(2.5rem,5vw,4rem)] font-bold text-white mb-6 leading-tight">
                交互式<span class="text-primary">3D</span>图片体验
            </h2>
            <p class="text-[clamp(1rem,2vw,1.25rem)] text-gray-200 max-w-2xl mx-auto mb-8">
                移动鼠标到图片的不同位置，探索令人惊叹的3D动画效果。每张图片都有独特的互动体验。
            </p>
            <a href="#gallery" class="inline-block bg-primary hover:bg-primary/90 text-white font-medium py-3 px-8 rounded-full transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-primary/30">
                开始探索 <i class="fa-solid fa-arrow-right ml-2"></i>
            </a>
        </div>
        <div class="absolute bottom-8 left-1/2 transform -translate-x-1/2 text-white animate-bounce">
            <i class="fa-solid fa-chevron-down"></i>
        </div>
    </section>

    <!-- 画廊区域 -->
    <section id="gallery" class="py-20 bg-white">
        <div class="container mx-auto px-4">
            <div class="text-center mb-16">
                <h2 class="text-[clamp(1.75rem,3vw,2.5rem)] font-bold text-dark mb-4">探索交互式画廊</h2>
                <p class="text-gray-600 max-w-2xl mx-auto">移动鼠标到下方图片的不同位置，观察图片如何根据鼠标位置产生独特的3D旋转效果。</p>
            </div>
            
            <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
                <!-- 图片卡片 1 -->
                <div class="image-card bg-white rounded-xl overflow-hidden shadow-lg group">
                    <div class="relative overflow-hidden" onmousemove="tiltImage(event, this)">
                        <div class="image-container perspective-1000 preserve-3d h-80">
                            <img src="https://haowallpaper.com/link/common/file/getCroppingImg/16835618515570048" alt="自然风景" class="w-full h-full object-cover backface-hidden">
                            <div class="absolute inset-0 bg-gradient-to-t from-dark/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end">
                                <div class="p-6">
                                    <h3 class="text-xl font-bold text-white mb-2">壮丽山脉</h3>
                                    <p class="text-gray-200 text-sm">探索大自然的壮丽之美</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="p-6">
                        <h3 class="text-xl font-bold text-dark mb-2">壮丽山脉</h3>
                        <p class="text-gray-600">探索大自然的壮丽之美，感受山脉的雄伟与宁静。</p>
                    </div>
                </div>
                
                <!-- 图片卡片 2 -->
                <div class="image-card bg-white rounded-xl overflow-hidden shadow-lg group">
                    <div class="relative overflow-hidden" onmousemove="tiltImage(event, this)">
                        <div class="image-container perspective-1000 preserve-3d h-80">
                            <img src="https://picsum.photos/id/20/800/600" alt="城市风光" class="w-full h-full object-cover backface-hidden">
                            <div class="absolute inset-0 bg-gradient-to-t from-dark/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end">
                                <div class="p-6">
                                    <h3 class="text-xl font-bold text-white mb-2">城市之光</h3>
                                    <p class="text-gray-200 text-sm">城市夜景的绚丽灯光与建筑</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="p-6">
                        <h3 class="text-xl font-bold text-dark mb-2">城市之光</h3>
                        <p class="text-gray-600">城市夜景的绚丽灯光与建筑，展现现代都市的繁华与活力。</p>
                    </div>
                </div>
                
                <!-- 图片卡片 3 -->
                <div class="image-card bg-white rounded-xl overflow-hidden shadow-lg group">
                    <div class="relative overflow-hidden" onmousemove="tiltImage(event, this)">
                        <div class="image-container perspective-1000 preserve-3d h-80">
                            <img src="https://picsum.photos/id/30/800/600" alt="海洋世界" class="w-full h-full object-cover backface-hidden">
                            <div class="absolute inset-0 bg-gradient-to-t from-dark/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end">
                                <div class="p-6">
                                    <h3 class="text-xl font-bold text-white mb-2">海洋深处</h3>
                                    <p class="text-gray-200 text-sm">探索神秘而美丽的海底世界</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="p-6">
                        <h3 class="text-xl font-bold text-dark mb-2">海洋深处</h3>
                        <p class="text-gray-600">探索神秘而美丽的海底世界，感受海洋生物的奇妙与多样性。</p>
                    </div>
                </div>
                
                <!-- 图片卡片 4 -->
                <div class="image-card bg-white rounded-xl overflow-hidden shadow-lg group">
                    <div class="relative overflow-hidden" onmousemove="tiltImage(event, this)">
                        <div class="image-container perspective-1000 preserve-3d h-80">
                            <img src="https://picsum.photos/id/40/800/600" alt="森林探险" class="w-full h-full object-cover backface-hidden">
                            <div class="absolute inset-0 bg-gradient-to-t from-dark/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end">
                                <div class="p-6">
                                    <h3 class="text-xl font-bold text-white mb-2">森林探险</h3>
                                    <p class="text-gray-200 text-sm">深入神秘的森林，探索自然的奥秘</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="p-6">
                        <h3 class="text-xl font-bold text-dark mb-2">森林探险</h3>
                        <p class="text-gray-600">深入神秘的森林，探索自然的奥秘，感受大自然的生命力。</p>
                    </div>
                </div>
                
                <!-- 图片卡片 5 -->
                <div class="image-card bg-white rounded-xl overflow-hidden shadow-lg group">
                    <div class="relative overflow-hidden" onmousemove="tiltImage(event, this)">
                        <div class="image-container perspective-1000 preserve-3d h-80">
                            <img src="https://picsum.photos/id/50/800/600" alt="沙漠奇观" class="w-full h-full object-cover backface-hidden">
                            <div class="absolute inset-0 bg-gradient-to-t from-dark/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end">
                                <div class="p-6">
                                    <h3 class="text-xl font-bold text-white mb-2">沙漠奇观</h3>
                                    <p class="text-gray-200 text-sm">无尽沙漠的壮丽景色与日出日落</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="p-6">
                        <h3 class="text-xl font-bold text-dark mb-2">沙漠奇观</h3>
                        <p class="text-gray-600">无尽沙漠的壮丽景色与日出日落，感受大自然的广袤与宁静。</p>
                    </div>
                </div>
                
                <!-- 图片卡片 6 -->
                <div class="image-card bg-white rounded-xl overflow-hidden shadow-lg group">
                    <div class="relative overflow-hidden" onmousemove="tiltImage(event, this)">
                        <div class="image-container perspective-1000 preserve-3d h-80">
                            <img src="https://picsum.photos/id/60/800/600" alt="冰川世界" class="w-full h-full object-cover backface-hidden">
                            <div class="absolute inset-0 bg-gradient-to-t from-dark/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end">
                                <div class="p-6">
                                    <h3 class="text-xl font-bold text-white mb-2">冰川世界</h3>
                                    <p class="text-gray-200 text-sm">壮观的冰川景观与极地生态</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="p-6">
                        <h3 class="text-xl font-bold text-dark mb-2">冰川世界</h3>
                        <p class="text-gray-600">壮观的冰川景观与极地生态，探索地球上最寒冷的地方。</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 关于区域 -->
    <section id="about" class="py-20 bg-gray-50">
        <div class="container mx-auto px-4">
            <div class="flex flex-col md:flex-row items-center gap-12">
                <div class="md:w-1/2">
                    <img src="https://picsum.photos/id/180/800/600" alt="关于我们" class="rounded-xl shadow-xl w-full">
                </div>
                <div class="md:w-1/2">
                    <h2 class="text-[clamp(1.75rem,3vw,2.5rem)] font-bold text-dark mb-6">关于交互式3D画廊</h2>
                    <p class="text-gray-600 mb-6">
                        我们的交互式3D画廊是一个创新的视觉体验平台，通过鼠标移动来探索图片的不同视角。每张图片都设计有独特的3D旋转效果，让你能够以全新的方式欣赏视觉艺术。
                    </p>
                    <p class="text-gray-600 mb-8">
                        我们精心挑选了各种主题的高质量图片，包括自然风光、城市建筑、野生动物等，为你带来沉浸式的视觉享受。
                    </p>
                    <div class="grid grid-cols-2 gap-4 mb-8">
                        <div class="flex items-center">
                            <i class="fa-solid fa-images text-primary text-2xl mr-4"></i>
                            <span>100+ 精选图片</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa-solid fa-magic text-primary text-2xl mr-4"></i>
                            <span>交互式3D效果</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa-solid fa-mobile text-primary text-2xl mr-4"></i>
                            <span>移动设备支持</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fa-solid fa-refresh text-primary text-2xl mr-4"></i>
                            <span>定期更新内容</span>
                        </div>
                    </div>
                    <a href="#gallery" class="inline-block bg-primary hover:bg-primary/90 text-white font-medium py-3 px-8 rounded-full transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-primary/30">
                        返回画廊 <i class="fa-solid fa-arrow-left ml-2"></i>
                    </a>
                </div>
            </div>
        </div>
    </section>

    <!-- 联系区域 -->
    <section id="contact" class="py-20 bg-white">
        <div class="container mx-auto px-4">
            <div class="text-center mb-16">
                <h2 class="text-[clamp(1.75rem,3vw,2.5rem)] font-bold text-dark mb-4">联系我们</h2>
                <p class="text-gray-600 max-w-2xl mx-auto">有任何问题或建议？请通过以下表单与我们联系，我们将尽快回复你。</p>
            </div>
            
            <div class="max-w-3xl mx-auto bg-white rounded-2xl shadow-xl p-8 md:p-12">
                <form>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
                        <div>
                            <label for="name" class="block text-sm font-medium text-gray-700 mb-2">姓名</label>
                            <input type="text" id="name" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary focus:border-primary transition-colors" placeholder="请输入你的姓名">
                        </div>
                        <div>
                            <label for="email" class="block text-sm font-medium text-gray-700 mb-2">邮箱</label>
                            <input type="email" id="email" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary focus:border-primary transition-colors" placeholder="请输入你的邮箱">
                        </div>
                    </div>
                    <div class="mb-6">
                        <label for="subject" class="block text-sm font-medium text-gray-700 mb-2">主题</label>
                        <input type="text" id="subject" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary focus:border-primary transition-colors" placeholder="请输入消息主题">
                    </div>
                    <div class="mb-8">
                        <label for="message" class="block text-sm font-medium text-gray-700 mb-2">消息</label>
                        <textarea id="message" rows="5" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary focus:border-primary transition-colors" placeholder="请输入你的消息内容"></textarea>
                    </div>
                    <button type="submit" class="w-full bg-primary hover:bg-primary/90 text-white font-medium py-3 px-8 rounded-lg transition-all duration-300 transform hover:scale-[1.02] shadow-lg hover:shadow-primary/30 flex items-center justify-center">
                        发送消息 <i class="fa-solid fa-paper-plane ml-2"></i>
                    </button>
                </form>
            </div>
        </div>
    </section>

    <!-- 页脚 -->
    <footer class="bg-dark text-white py-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <div class="flex items-center space-x-2 mb-6">
                        <i class="fa-solid fa-cubes text-primary text-2xl"></i>
                        <h3 class="text-xl font-bold">3D<span class="text-primary">画廊</span></h3>
                    </div>
                    <p class="text-gray-400 mb-6">
                        探索交互式3D图片体验，移动鼠标探索全新视角。
                    </p>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-400 hover:text-primary transition-colors">
                            <i class="fa-brands fa-facebook"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-primary transition-colors">
                            <i class="fa-brands fa-twitter"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-primary transition-colors">
                            <i class="fa-brands fa-instagram"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-primary transition-colors">
                            <i class="fa-brands fa-pinterest"></i>
                        </a>
                    </div>
                </div>
                <div>
                    <h4 class="text-lg font-semibold mb-6">快速链接</h4>
                    <ul class="space-y-3">
                        <li><a href="#gallery" class="text-gray-400 hover:text-primary transition-colors">画廊</a></li>
                        <li><a href="#about" class="text-gray-400 hover:text-primary transition-colors">关于</a></li>
                        <li><a href="#contact" class="text-gray-400 hover:text-primary transition-colors">联系</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-primary transition-colors">隐私政策</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-primary transition-colors">服务条款</a></li>
                    </ul>
                </div>
                <div>
                    <h4 class="text-lg font-semibold mb-6">联系信息</h4>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <i class="fa-solid fa-map-marker-alt text-primary mt-1 mr-3"></i>
                            <span class="text-gray-400">北京市朝阳区建国路88号</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fa-solid fa-phone text-primary mt-1 mr-3"></i>
                            <span class="text-gray-400">+86 10 8888 8888</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fa-solid fa-envelope text-primary mt-1 mr-3"></i>
                            <span class="text-gray-400">info@3dgallery.com</span>
                        </li>
                    </ul>
                </div>
                <div>
                    <h4 class="text-lg font-semibold mb-6">订阅更新</h4>
                    <p class="text-gray-400 mb-4">订阅我们的通讯，获取最新的图片和功能更新。</p>
                    <form class="flex">
                        <input type="email" placeholder="你的邮箱地址" class="px-4 py-2 rounded-l-lg w-full focus:outline-none text-dark">
                        <button type="submit" class="bg-primary hover:bg-primary/90 text-white px-4 py-2 rounded-r-lg transition-colors">
                            <i class="fa-solid fa-arrow-right"></i>
                        </button>
                    </form>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-12 pt-8 text-center text-gray-500">
                <p>&copy; 2025 3D画廊. 保留所有权利.</p>
            </div>
        </div>
    </footer>

    <script>
        // 图片倾斜效果函数
        function tiltImage(event, container) {
            const imageContainer = container.querySelector('.image-container');
            const rect = container.getBoundingClientRect();
            const x = event.clientX - rect.left; // 鼠标在容器内的X坐标
            const y = event.clientY - rect.top; // 鼠标在容器内的Y坐标
            
            // 计算倾斜角度，范围在-15度到15度之间
            const xTilt = ((y / rect.height) - 0.5) * 30;
            const yTilt = ((x / rect.width) - 0.5) * -30;
            
            // 应用3D变换
            imageContainer.style.transform = `perspective(1000px) rotateX(${xTilt}deg) rotateY(${yTilt}deg) scale3d(1.05, 1.05, 1.05)`;
            
            // 为阴影添加动态效果
            container.style.boxShadow = `${5 + Math.abs(yTilt/3)}px ${5 + Math.abs(xTilt/3)}px 25px rgba(0, 0, 0, 0.15)`;
        }
        
        // 鼠标离开时重置效果
        document.querySelectorAll('.image-card').forEach(card => {
            card.addEventListener('mouseleave', function() {
                const imageContainer = this.querySelector('.image-container');
                imageContainer.style.transform = 'perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)';
                this.style.boxShadow = '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)';
            });
        });
        
        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
        
        // 导航栏滚动效果
        window.addEventListener('scroll', function() {
            const header = document.querySelector('header');
            if (window.scrollY > 50) {
                header.classList.add('py-2');
                header.classList.remove('py-4');
                header.classList.add('shadow-md');
            } else {
                header.classList.add('py-4');
                header.classList.remove('py-2');
                header.classList.remove('shadow-md');
            }
        });
    </script>
</body>
</html>
    